package com.ztman.service.work.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ztman.basic.base.entity.Entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;

import static com.ztman.basic.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 *
 * </p>
 *
 * @author wsd
 * @since 2021-08-23
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("p_task_info")
@ApiModel(value = "TaskInfo", description = "")
@AllArgsConstructor
public class TaskInfo extends Entity<Long> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "")
    @Length(max = 256, message = "长度不能超过256")
    @TableField(value = "name", condition = LIKE)
    @Excel(name = "")
    private String name;

    @ApiModelProperty(value = "")
    @Length(max = 45, message = "长度不能超过45")
    @TableField(value = "task_type", condition = LIKE)
    @Excel(name = "")
    private String taskType;

    @ApiModelProperty(value = "")

    @TableField("content")
    @Excel(name = "")
    private String content;

    @ApiModelProperty(value = "")

    @TableField("remarks")
    @Excel(name = "")
    private String remarks;
    /**
     * 启用状态
     */
    @ApiModelProperty(value = "启用状态")
    @TableField("state")
    @Excel(name = "启用状态", replace = {"是_true", "否_false", "_null"})
    private Boolean state;

    /**
     * 删除状态
     */
    @ApiModelProperty(value = "删除状态")
    @TableField("del_flag")
    @Excel(name = "删除状态", replace = {"是_true", "否_false", "_null"})
    private Boolean delFlag;

    @Builder
    public TaskInfo(Long id, LocalDateTime createTime, Long createdBy, LocalDateTime updateTime, Long updatedBy,
                    String name, String taskType, String content, String remarks) {
        this.id = id;
        this.createTime = createTime;
        this.createdBy = createdBy;
        this.updateTime = updateTime;
        this.updatedBy = updatedBy;
        this.name = name;
        this.taskType = taskType;
        this.content = content;
        this.remarks = remarks;
    }

}
